<template>
	<view class="content">
		<swiper :indicator-dots="true" :interval="3000" :duration="1000" class="swiper">
			<swiper-item>
				<view class="swiper-item">
					<view class="hard_copy">
						<image
							src="http://123.157.242.136:8089/wxc/yd1.png" 
							mode="scaleToFill"></image>
					</view>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<view class="hard_copy">
						<image
							src="http://123.157.242.136:8089/wxc/yd2.png"
							mode="scaleToFill"></image>
					</view>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<view class="hard_copy">
						<image
							src="http://123.157.242.136:8089/wxc/yd3.png"
							mode="scaleToFill"></image>
					</view>
				</view>
				<view class="btn" @click="to_login">
					进入
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				animationData: {}
			}
		},
		onHide() {
			//#ifdef APP-PLUS
			      plus.navigator.setFullscreen(false) //隐藏状态栏
			 //    #endif
		},
		onShow: function() {
			var animation = uni.createAnimation({
				duration: 500,
				timingFunction: 'ease',
			})
			this.animation = animation
			this.y()
		},
		onLoad:function() {
						//#ifdef APP-PLUS
			                  plus.navigator.setFullscreen(true) //隐藏状态栏
			             //    #endif
			
		},
		onUnload() {
			//#ifdef APP-PLUS
			      plus.navigator.setFullscreen(true) //隐藏状态栏
			 //    #endif
		},
		methods: {
			y() {
				this.animation.translateY(-800).step({
					duration: 200
				})
				this.animationData = this.animation.export()
			},
			to_login() {
				console.log("进入")
				uni.navigateTo({
					url: '../login/login'
				})
			}
		}
	}
</script>

<style>
	page {
		width: 100%;		 
	}

	.content {
		width: 100%;
		height: 100%;
		background-size: 100% auto;
		padding: 0;
	 
	}

	.swiper {
		width: 100%;
		height: 100%;
		background: #fff;
	}

	.swiper-item {
		width: 100%;
		height: 100%;

	}

	.hard_copy {
		width: 100%;
		height: 100%;
		/* background-color: #007AFF; */
	}

	.hard_copy>image {
		width: 100%;
		height: 100%;
	}

	.btn {
		width: 200rpx;
		height: 100rpx;
		border-radius: 50rpx;
		background-color: #FAF9D4;
		position: absolute;
		bottom: 200rpx;
		right: 100rpx;
		/* font-family: cocl; */
		color: #CE3939;
		display: flex;
		justify-content: center;
		font-size: 46rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>
